#pragma once

#include <iostream>

#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>

#include "Log.hpp"

#define CONV(sock) (struct sockaddr *)sock

#define DIE(code) exit(code)

enum
{
    SOCKET_ERROR = 1,
    BIND_ERROR,
    SENDTO_ERROR,
    USAGE_ERROR,
    RECVFROM_ERROR,
    FILE_OPEN_ERROR
};